﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Fysh.ComputerScience.Genetics
{
    public class AsyncAlignmentResult : IAsyncResult
    {
        private AlignmentResult _asyncState;
        private System.Threading.WaitHandle _asyncWaitHandle;
        private bool _completedSynchronously;
        private bool _isCompleted;
        #region IAsyncResult Members

        public AsyncAlignmentResult(
            AlignmentResult asyncState,
            System.Threading.WaitHandle asyncWaitHandle,
            bool completedSynchronously,
            bool isCompleted)
        {
            _asyncState = asyncState;
            _asyncWaitHandle = asyncWaitHandle;
            _completedSynchronously = completedSynchronously;
            _isCompleted = isCompleted;
        }

        public object AsyncState
        {
            get { return _asyncState; }
        }

        public System.Threading.WaitHandle AsyncWaitHandle
        {
            get { return _asyncWaitHandle; }
        }

        public bool CompletedSynchronously
        {
            get { return _completedSynchronously; }
        }

        public bool IsCompleted
        {
            get { return _isCompleted; }
            set { _isCompleted = value; }
        }

        #endregion
    }
}
